From: Alessandro Bono Date: Fri, 20 Feb 2026 22:56:17 +0000 (+0100) Subject: lookingGlass: Use replaceAll() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~26^2~1^2~38 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8ebf6ba2ca6000b99d6049ebbe2726c92af0e4e9;p=gnome-shell.git lookingGlass: Use replaceAll() Remove all the newlines occurrences, not just the first one. Fixes: 52ae75d4b ("LookingGlass - JavaScript prompt and interactive Clutter controller") Part-of: --- diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index 41f4940f5..7ba30eb95 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -1446,7 +1446,7 @@ class LookingGlass extends St.BoxLayout { let text = o.get_text(); // Ensure we don't get newlines in the command; the history file is // newline-separated. - text = text.replace('\n', ' '); + text = text.replaceAll('\n', ' '); this._evaluate(text).catch(logError); return true; });